package com.bjpowernode.crm.workbench.service.impl;

import com.bjpowernode.crm.workbench.domain.FunnelVO;
import com.bjpowernode.crm.workbench.domain.Tran;
import com.bjpowernode.crm.workbench.mapper.TranMapper;
import com.bjpowernode.crm.workbench.service.TranService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName : TranServiceImpl
 * @Author : 司猫子
 * @Date: 2021/1/13 20:06
 */
@Service
public class TranServiceImpl implements TranService {
    @Autowired
    private TranMapper tranMapper;
    public int deleteByPrimaryKey(String id) {
        return tranMapper.deleteByPrimaryKey(id);
    }

    public int insert(Tran record) {
        return tranMapper.insert(record);
    }

    public int insertSelective(Tran record) {
        return tranMapper.insertSelective(record);
    }

    public Tran selectByPrimaryKey(String id) {
        return tranMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Tran record) {
        return tranMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(Tran record) {
        return tranMapper.updateByPrimaryKey(record);
    }

    public int insertTran(Tran tran) {
        return tranMapper.insertTran(tran);
    }

    public Tran selectTranForDetailById(String id) {
        return tranMapper.selectTranForDetailById(id);
    }

    public List<FunnelVO> selectCountOfTranGroupByStage() {
        return tranMapper.selectCountOfTranGroupByStage();
    }
}
